create external table jms_ods.rb_scan_record
(
  rfid              string comment 'rfid',
  scan_type_code    string comment '扫描类型编号',
  scan_type_name    string comment '扫描类型名称',
  package_code      string comment '包号',
  scan_time         timestamp comment '扫描时间',
  input_time        timestamp comment '录入时间',
  scan_network_code string comment '扫描网点编号',
  scan_network_name string comment '扫描网点名称',
  scan_staff_code   string comment '扫描员工编号',
  scan_staff_name   string comment '扫描员工名称',
  dest_network_code string comment '目的地网点编号',
  dest_network_name string comment '目的地网点名称',
  scan_id           string comment '扫描id'
) comment '循环袋扫描记录表'
partitioned by (
  `dt` string comment '创建日期 (yyyy-mm-dd-hh)')
stored as parquet
location
  'hdfs://yl-bg-hdp/dw/hive/jms_ods.db/external/rb_scan_record';